package com.gxa.insurance.service;

import com.gxa.insurance.exception.BusinessException;
import com.gxa.insurance.pojo.Order;
import com.gxa.insurance.pojo.OrderStatus;
import com.gxa.insurance.pojo.OrderType;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * @author Min
 */
public interface OrderService {
    Order selectOrderByNumber(String number) throws Exception;

    List<Order> selectAllOrderList() throws Exception;

    Map<String, Object> selectAllOrder(Map<String, Integer> map) throws Exception;

    List<Order> selectNotReturnedOrder() throws Exception;

    /**
     * 查询所有订单类型
     *
     * @return
     */
    List<OrderType> selectAllType();

    /**
     * 查询所有订单来源
     *
     * @return
     */
    List<String> selectAllSource();

    /**
     * 查询所有订单状态类型
     *
     * @return
     */
    List<OrderStatus> selectAllStatus();

    /**
     * @param map
     * @return
     */
    Map<String, Object> selectByLike(Map map) throws ParseException;

    /**
     * 通过后台添加订单
     *
     * @param map
     * @return
     */
    Boolean addByBackStage(Map<String, String> map) throws Exception;

    /**
     * 获取订单详情
     *
     * @param orderNumber
     * @return
     */
    List<Order> getPayNumber(String orderNumber) throws Exception;

    /**
     * 获取用户所有的订单
     * @param 联系人手机号
     * @return
     */
    /*List<UserOder> getUserOrder(String phone);*/

  
    /**
     * 修改易理赔订单及其相应相关订单
     *
     * @param map
     * @return
     */
    Boolean updateInsuranceByOrder(Map<String, String> map) throws ParseException, BusinessException;


    Map<String, Object> selectDetailByNumberAndType(Map<String, String> map) throws BusinessException;


    /**
     * 获取所有的订单用于司机端
     *
     * @param
     * @return
     */
    Map<String, List<Map<String, Object>>> getOrder();

    Boolean deleteBatch(String ids);

    Boolean updateInspectByOrder(Map<String, String> map) throws ParseException, BusinessException;

    Integer updateOrderStatusByNumber(String number, String orderStatus) throws Exception;
    List<Order>selectOrderDetails(Integer id) throws BusinessException;
}
